/**
 * Shopware 5
 * Copyright (c) shopware AG
 *
 * According to our dual licensing model, this program can be used either
 * under the terms of the GNU Affero General Public License, version 3,
 * or under a proprietary license.
 *
 * The texts of the GNU Affero General Public License with an additional
 * permission and of our proprietary license can be found at and
 * in the LICENSE file you have received along with this program.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * "Shopware" is a registered trademark of shopware AG.
 * The licensing of the program under the AGPLv3 does not imply a
 * trademark license. Therefore any rights, title and interest in
 * our trademarks remain entirely with us.
 *
 * @category   Shopware
 * @package    Shopware_Styling
 * @subpackage Toolbar
 * @version    $Id$
 * @author shopware AG
 */

// Default window toolbar
.#{$prefix}window, .#{$prefix}window-default {
	.#{$prefix}toolbar, .#{$prefix}toolbar-default {
	    border-left: 1px solid $light-border-color;
       	border-right: 1px solid $light-border-color;

	 	// Default search field
		.searchfield {
			@include border-radius(0);

			// Left radius with search icon
	  		&:before {
	  		    position: absolute;
	  			left: -22px;
	  		   	display: block;
	  			width: 22px;
	 			content: '';
	 			background: theme-image($theme, 'window_search_left.png') no-repeat;
	 			height: 21px;
	  		}

			// Main field background
			.#{$prefix}form-item-body {
				@include reset-border-radius;
				background: theme-image($theme, 'window_search_mid.png') repeat-x;
				padding: 0;
			}

			// Right radius
	 		.#{$prefix}form-text {
				background: theme-image($theme, 'window_search_right.png') no-repeat right 0;
				border: 0 none;
				height: 21px;
				color: $light-font-color;
				font-size: 11px;
				@include reset-border-radius;
				@include reset-box-shadow;
	 		}
	    }
	}
}

.#{$prefix}toolbar, .#{$prefix}toolbar-default {
    .#{$prefix}btn-disabled {
        @include opacity(0.5);

        span {
            @include opacity(1);
        }
    }
}

.#{$prefix}ie9 .#{$prefix}window, .#{$prefix}ie9 .#{$prefix}window-default {
    .#{$prefix}toolbar, .#{$prefix}toolbar-default {
        .searchfield {
            .#{$prefix}form-item-body {
                margin: 0 0 0 22px;
                position: relative;

                &:before {
                    position: absolute;
                    left: -22px;
                    display: block;
                    width: 22px;
                    content: '';
                    background: theme-image($theme, 'window_search_left.png') no-repeat;
                    height: 21px;
                }
            }
        }
    }
}

// Paging Toolbar
.#{$prefix}toolbar-docked-bottom {
	@include border-radius(0 0 3px 3px);
    background: $toolbar-background-color;

	// Button normal style
    .#{$prefix}btn-default-toolbar-small {
        background: transparent;

        em, button {
            background: transparent;
            line-height: $toolbar-text-line-height;
            height: $toolbar-text-line-height;
        }
    }

    // Select page number field
    .#{$prefix}tbar-page-number .#{$prefix}form-item-body {

        // Normal state
        .#{$prefix}form-text {
        	@include border-radius(3px);
			border-color: #b1bac0 #cad0d4 #dbdfe2;
			-webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
			-moz-transition: border linear 0.2s, box-shadow linear 0.2s;
			-ms-transition: border linear 0.2s, box-shadow linear 0.2s;
			-o-transition: border linear 0.2s, box-shadow linear 0.2s;
			transition: border linear 0.2s, box-shadow linear 0.2s;
        }

        // Active state
     	.#{$prefix}form-focus {
            @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6));
            border-color: rgba(82, 168, 236, 0.8);
		}
    }

    // Paging toolbar icons
    .#{$prefix}btn-default-toolbar-small .#{$prefix}btn-center {

        .#{$prefix}tbar-page-first, .#{$prefix}tbar-page-prev, .#{$prefix}tbar-page-next, .#{$prefix}tbar-page-last {
            background-image: theme-image($theme, 'sprite-arrows.png') !important;
            background-repeat: no-repeat;
        }

        .#{$prefix}tbar-page-first { background-position: 0 -198px }
        .#{$prefix}tbar-page-prev { background-position: 0 -66px }
        .#{$prefix}tbar-page-next { background-position: 0 -462px }
        .#{$prefix}tbar-page-last { background-position: 0 -330px }

        .#{$prefix}tbar-loading {
            background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPlQTFRF////X2eHYGSEVnebVnidWmWHVm6SUHqhToGpPHaiN3qoPIGvOH+tPIy7OZPDO5bHOpfIKoS4NZzQHIa+J5PJLJnON6XZC4/MIZvUJJ3VOqndC5LQFZfTLaPZOKjcC5LQDpTREpbSFZfTGZnUHJvVH5zVI57WJJ7WJqDXKqLYLaPZMaXaMqXZNKfbOKjcQ6zcTLHeUrTfVbTgVbXhVrPfWrbgY7vjZrzjaL3kf8bnf8fogcfohMnohsnojM3qjs7qmNHrndTtoNXu0uv30+z31Oz31ez31e331+341+742e742+/45vT79vv99/v99/z++Pz++v3+////+MXzAAAAAB90Uk5TAAQEBQUbHiEkeHx8fYCEhIWdocTFxcbw8PDw8/Pz8xyiDtEAAADDSURBVBgZBcHRToMwAIbRr9BBw5CxeUEWL3z/hzImJsYsBgYMYYXS33MMgMtzS/D+CRiwZVUD0I9TwJCe3gAA+B52y/H6foCvixkfXMOY5q/Z5qzpVZzthPFJVsrkd3T/bOsXlVnipPPzF0m36SK5xMbopvVjiTEuWYzWSsSoGUASskF4JwCcFyFZpK5qJKmpOmmxm8/aY+NmilPXsm7pHguGraiK/fYD3WIw9QkAgKFXCqvPEgBC+ycMwMEWljCHDfgH3pFtjLSGZ+4AAAAASUVORK5CYII=") no-repeat !important;
        }
    }

    // Disabled toolbar icons
    .#{$prefix}btn-default-toolbar-small-disabled .#{$prefix}btn-center {
        .#{$prefix}tbar-page-first { background-position: 0 -132px }
        .#{$prefix}tbar-page-prev { background-position: 0 0 }
        .#{$prefix}tbar-page-next { background-position: 0 -396px }
        .#{$prefix}tbar-page-last { background-position: 0 -264px}

        .#{$prefix}tbar-loading {
            background: url("data:image/gif;base64,R0lGODlhEAAQAPIAAP///wAAAMLCwkJCQgAAAGJiYoKCgpKSkiH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAADMwi63P4wyklrE2MIOggZnAdOmGYJRbExwroUmcG2LmDEwnHQLVsYOd2mBzkYDAdKa+dIAAAh+QQJCgAAACwAAAAAEAAQAAADNAi63P5OjCEgG4QMu7DmikRxQlFUYDEZIGBMRVsaqHwctXXf7WEYB4Ag1xjihkMZsiUkKhIAIfkECQoAAAAsAAAAABAAEAAAAzYIujIjK8pByJDMlFYvBoVjHA70GU7xSUJhmKtwHPAKzLO9HMaoKwJZ7Rf8AYPDDzKpZBqfvwQAIfkECQoAAAAsAAAAABAAEAAAAzMIumIlK8oyhpHsnFZfhYumCYUhDAQxRIdhHBGqRoKw0R8DYlJd8z0fMDgsGo/IpHI5TAAAIfkECQoAAAAsAAAAABAAEAAAAzIIunInK0rnZBTwGPNMgQwmdsNgXGJUlIWEuR5oWUIpz8pAEAMe6TwfwyYsGo/IpFKSAAAh+QQJCgAAACwAAAAAEAAQAAADMwi6IMKQORfjdOe82p4wGccc4CEuQradylesojEMBgsUc2G7sDX3lQGBMLAJibufbSlKAAAh+QQJCgAAACwAAAAAEAAQAAADMgi63P7wCRHZnFVdmgHu2nFwlWCI3WGc3TSWhUFGxTAUkGCbtgENBMJAEJsxgMLWzpEAACH5BAkKAAAALAAAAAAQABAAAAMyCLrc/jDKSatlQtScKdceCAjDII7HcQ4EMTCpyrCuUBjCYRgHVtqlAiB1YhiCnlsRkAAAOwAAAAAAAAAAAA==") no-repeat !important
        }
    }
}

.#{$prefix}safari {
    .shopware-menu .#{$prefix}btn-default-toolbar-small {
        .#{$prefix}btn-inner {
            font-weight: 700 !important;
        }
    }
}

// Main Menu Toolbar
.shopware-menu {
    @include single-box-shadow(rgba(0, 0, 0, 0.075), 0, 3px, 0);
    background: svg-linear-gradient(0%, 0%, 0%, 100%, (
        svg-color-stop(rgba(46,181,249,1), 0%, 1),
        svg-color-stop(rgba(22,129,211,1), 100%, 1)
    )) center center no-repeat transparent;
	padding: 0 0 0 6px;
    border-width: 0 0 1px 0 !important;
    border-color: #0b6dbe !important;
    overflow: visible;
    position: fixed;
    left: 0; top: 0;
    width: 100%;
    z-index: 100000 !important;

    .#{$prefix}box-inner {
		width: 100% !important;
		background: theme-image($theme, 'sw4_logo-shine.png') no-repeat right center;
        overflow: visible;
    }

    .#{$prefix}btn-default-toolbar-small-focus {
        background: none;
    }

	// Seperators
	.#{$prefix}toolbar-separator-horizontal {
       margin: 18px 0 0 0;
	   height: 18px;
	   border-left: 1px solid rgba(24, 109, 184, 0.6);
	   border-right: 1px solid rgba(255, 255, 255, 0.2);
   }

   // Search field
   .searchfield-container {
       margin: 0 0 0 12px;
       @include transition-property(all);
       @include transition-duration(0.3s);
       @include transition-timing-function(ease-out);
       @include border-radius(16px);
       position: relative;
       top: 8px !important;

       table {
           margin: -1px !important;
       }
   }
   .searchfield tbody {
       padding: 0;
       height: $search-field-height;
       width: auto !important;
       display: block;
       margin: 0 !important;

       .#{$prefix}form-item-body {
           background: #186db8;
           border-bottom: 1px solid rgba(59, 170, 250, 1);
           border-radius: 14px;
           padding: 0 0 0 0;
           height: $search-field-height;
           width: auto !important;

           -webkit-box-shadow:inset 0 2px 0 #185f9d;
           -moz-box-shadow:inset 0 2px 0 #185f9d;
           box-shadow:inset 0 2px 0 #185f9d;

           .#{$prefix}form-field {
               @include border-radius(0px);
           	   @include reset-box-shadow;
               background: theme-image($theme, 'search_taskbar_top_left.png') no-repeat 9px 6px transparent;
               padding-left: 32px;
               border: 0 none;
               height: $search-field-height;
               min-width: 320px;
               width: auto !important;
               color: #fff;
               text-shadow: #145c9a 0 1px 0;
               font-size: 12px;
               line-height: 16px;

               /** Styling the empty text */
               &::-webkit-input-placeholder {
                   color: lighten($font-color, 100%);
                   text-shadow: #145c9a 0 1px 0;
               }
               &:-moz-placeholder {
                   color: lighten($font-color, 100%);
                   text-shadow: #145c9a 0 1px 0;
               }
           }
       }
	}

    // Search field - Focus state
    .searchcontainer-focus {
        -webkit-box-shadow: 0 0 5px #fff;
        -moz-box-shadow: 0 0 5px #fff;
        -ms-box-shadow: 0 0 5px #fff;
        -o-box-shadow: 0 0 5px #fff;
        box-shadow: 0 0 5px #fff;
    }
}

// Search drop down
.#{$prefix}search-dropdown {
	top: 54px !important;
	width: 330px;
	border-bottom: 1px solid #a3adb4;
    -webkit-box-shadow: 0 1px 1px 0 rgba(0, 55, 110, 0.4) !important;
    -moz-box-shadow: 0 1px 1px 0 rgba(0, 55, 110, 0.4) !important;
    -ms-box-shadow: 0 1px 1px 0 rgba(0, 55, 110, 0.4) !important;
    box-shadow: 0 1px 1px 0 rgba(0, 55, 110, 0.4) !important;

	.arrow-top {
		background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAHBAMAAADDgsFQAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABtQTFRFDXLc////DXLcILL8IbX/Jrf/K7j/MLr/M7v/QrLU/gAAAAJ0Uk5TAAB2k804AAAALklEQVQI12MQFFRiFGQQFOpQAJLqaUWMDEJpaWkKDKouLi5BDM7GxsYmDMYgAACCmAb6OwoFKwAAAABJRU5ErkJggg==") no-repeat;
		display: block;
		position: absolute;
		top: -5px; left: 16px;
		width: 10px; height: 7px;
	}

	.header {
        @include border-radius(3px 3px 0 0);
        background: svg-linear-gradient(0%, 0%, 0%, 100%, (
            svg-color-stop(rgba(46,181,249,1), 0%, 1),
            svg-color-stop(rgba(22,129,211,1), 100%, 1)
        )) center center no-repeat transparent;
        border: 1px solid #1974d8;
		height: 33px;
		color: #fff;
		font-weight: bold;
		line-height: 33px;
		text-shadow: 1px 1px 0 #1774d8;

		.inner {
			padding: 0 0 0 40px;
		}
	}

	.articles .header {
        .inner {
			background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAWlBMVEUAAAASXqARXZ8QZq8cfcgfgMg3tP8fgsw3s/8hhdA3s/83tP8VcLo3s/84tP8Oa7sNa7oOa7oObLs3s/8RXp8RXZ84tP8QZq8OabYSXqAPZa4PbLsRZKgTdMNFKb3LAAAAD3RSTlMA39/+gpxbnFGWTt9vVkca7skOAAAAhElEQVR4XnXIRxICMQxEUZMz3S15EuH+10Su0lCzgK+weOV3q1prFxN/ndR1NXaKq1PSSAKIo41J1sTACEkSRVKCmARAQrQkEmxiSCLFSDDMZAAJmPAlInFBBkr0VpIII3kdHpvtTCBF7oaX75NAMDo8/Viyt9Ds5Ocyd+m9791v9/KvD2A2DAj9SM9sAAAAAElFTkSuQmCC") no-repeat 14px 7px;
		}
	}

	.customers .header .inner {
		background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAACAUlEQVQ4y2NgoAUQjJvPCMSLBGPn3wTiP4JxC24BsTvJBgnFL3QBGvQfhIXiFvwHGgZkL/gNpMVIMkiqcMs8gfSN//kyt/3ny979nz9r+3+BxOX/pYq2e0JcvIAZaGgM0JIaINsVp0HS5fuOgwwAYd7sXWDMB8TSZXtqoS5OgrsW5PLY+R7YDao8fJUvZzdYM8xAEJapOrQYJC9ZsHWPQPKq/wKpa/8LJC37L128fR5Wg7SmP9kKMogX2SAgX3feqzaw18v230CWkyrdewKrQeab/ztKN15AMUi64cJ/oLgqSF5jyoN9MG+DaLX+27twhpN8541byF5TnnDvMtyiTf/9RUqOgMWFig79N9vwNwJ7Ooqdzy+ct/sFckCLFO29BRTnAskLJK30RXaRUPo6P2DsMSLST9wCTaDiyUDBj/wpa6Gu2QUOH4GUNaAYegPEHXJVB/olqk5A5IFJQzAWHHuXgfpCQK7oBeJ/oOgUiFv4ny9jKzzqQZg/YwtEAzBxCiSt+KPUd/e+VMM5iCXANAZOBvELfjEIJS76IRC/5L9A2gagLQgvQZIB1GVZO/6DXAr02n8hoNfl264+gIUhf8Y2kAX/GfjTNyA0IKUdZO8hkgQwzLK3/NJd8G4BMCb/I2MGPqSARU7VmIZCDBTK3/sHe9rZgmoyNmyBquYlw5AAALfsmczHc7Z5AAAAAElFTkSuQmCC") no-repeat 14px 7px;
	}

	.orders .header .inner {
		background: theme-image($theme, 'icon_taskbar_top_artikel.png') no-repeat 14px 7px;
	}

	.result-container {
		border-left: 1px solid #a3adb4;
		border-right: 1px solid #a3adb4;
		background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAADCAAAAAB3tjpeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAADklEQVQIHWN4yvCB4QcACEcCznTUrS8AAAAASUVORK5CYII=") repeat-x left top;

		// Empty search result
		.empty {
			padding: 8px 18px;
			color: $font-color;
		}

		a {
			display: block;
			border: 1px solid transparent;
			border-bottom: 1px solid #ccc;
			color: #475c6b;
			text-shadow: 1px 1px 0 #fff;
			text-decoration: none;
			font-weight: bold;
			padding: 8px 18px;
			position: relative;

			@include transition-property(all);
       		@include transition-duration(0.5s);
       		@include transition-timing-function(ease-out);

			// Hover style
			&:hover {
				border-top-color: #c3dcf0;
				border-bottom-color: #c3dcf0;
				background: #e2f3ff;
			}

            // Name
            .name {
                width: 210px !important;
            }

			// Description
			.desc, .right {
				display: block;
				font-size: 11px;
				font-weight: normal;
			}

			// Amount
			.right {
				position: absolute;
				right: 18px;
				top: 8px;
			}
		}

		a:last-child {
			border-bottom: 0 none;
		}
	}
}

// IE 9 Top Menu
.#{$prefix}ie9 .shopware-menu {
    background: theme-image($theme, 'nav_taskbar_top_bg.png') repeat-x !important;

    .searchfield {
        .#{$prefix}form-item-body {
            position: relative;
        }

        .#{$prefix}form-field {

            &:before {
                display: block;
                background: theme-image($theme, 'search_taskbar_top_left.png') no-repeat 0 0;
                position: absolute;
                top: 0;
                left: -26px;
                content: '';
            }
        }
    }
}

// Footer Toolbar
.shopware-footer {
    position: fixed;
   	padding: 0 6px 0 0;
    background: svg-linear-gradient(0%, 0%, 0%, 100%, (
        svg-color-stop(rgb(255, 255, 255), 0%, 1),
        svg-color-stop(rgb(233, 241, 251), 100%, 1)
    )) center center no-repeat transparent;
    border: 0 none;
    border-top: 1px solid #8cabcb;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100000 !important;

	// Seperator
	.#{$prefix}toolbar-separator-horizontal {
		top: 0px !important;
        height: 40px;
        border-left: 1px solid rgba(255, 255, 255, 1);
        border-right: 1px solid rgba(140, 173, 203, 0.18);
    }
}

// IE 9 Footer
.#{$prefix}nlg .shopware-footer {
    background: theme-image($theme, 'nav_taskbar_cap_bg.png') repeat-x !important;
}

.#{$prefix}toolbar-shopware-ui {
    border: 0 none;
    background: $toolbar-background-color;
}
.window-management-holder {
    width: 100% !important;
    height: 40px !important;
}

.#{$prefix}safari {
    .window-management-holder .#{$prefix}btn-default-small .#{$prefix}btn-inner {
        font-weight: 700 !important;
    }
}

.logout-tooltip  {
    @include border-radius(3px);
    position: fixed !important;
    bottom: 50px !important;
    left: 10px !important;
    top: auto !important;
    background: rgba(0, 0, 0, .5);
    border: 0 none;
    z-index: 100000 !important;

    .#{$prefix}tip-body {
        color: #fff;
        padding: 4px 12px;
        position: relative;
        overflow: visible;

        span {
            float: left;
            border-right: 1px solid rgba(0, 0, 0, 0.3);
            display: block;
            padding-right: 5px;
        }

        a {
            color: #fff;
            float: left;
            display: block;
            padding-left: 5px;
            border-left: 1px solid rgba(100, 100, 100, 0.8);
            font-weight: bold;
            text-decoration: none;

            &:hover {
                text-decoration: underline;
            }
        }

        .arrow {
            background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAFCAYAAAB8ZH1oAAAAK0lEQVR42o3KUQoAAAREQUd38yWF0gb1fGwjfvoKwInD+Is2lLDiqCHFczcAj0rFAI4TQgAAAABJRU5ErkJggg==") no-repeat;
            width: 10px;
            height: 5px;
            position: absolute;
            bottom: -7px;
            left: 10px;
        }
    }
}

.#{$prefix}window > .#{$prefix}toolbar-shopware-ui-docked-bottom, .shopware-toolbar {
	padding: 5px 8px 6px 8px;

	.#{$prefix}box-inner {
		overflow: visible;
	}
}
